package com.szrt.zengyao.day20161019;

import java.util.Scanner;

import org.junit.Test;

public class TeacherServiceTest {
	private TeacherEntity [] teacherArr = {
			new TeacherEntity(1,"黄老师",18,2500),
			new TeacherEntity(2,"李老师",20,2500)
	};
	Scanner sc = new Scanner(System.in);
	@Test
	public void test(){
		TeacherServiceImpl xx = new TeacherServiceImpl();
		while(true){
			System.out.println("请输入查询老师的ID:");
			int id = sc.nextInt();
			TeacherEntity teacher = xx.findEntityById(id, teacherArr);
			if(teacher!=null){
				System.out.println(teacher.toString());
				
			}else{
				System.out.println("查无此人");
			}
		}
	}

}
